import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Rank from '../views/Rank.vue'
import PlayListDetail from '../components/playListDetail/PlayListDetail.vue'
import RankListDetail from '../components/rank/RankListDetail.vue'
import Player from '../components/Player/Player.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta:{
      showTab:true
    }
  },
  {
    path: '/rank',
    name: 'Rank',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component:Rank
  },
  {
  path:'/playlistdetail/:id',
  name:'PlayListDetail',
  component:PlayListDetail,
  meta:{
    showTab:false
  }
},
{
  path:'/ranklistdetail/:id',
  name:'RankListDetail',
  component:RankListDetail
},
{
  path:'/player/:id',
  name:'Player',
  component:Player
}
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
